package com.vue.power.backend.sys.controller;

import com.vue.power.backend.common.base.controller.BaseController;
import com.vue.power.backend.common.base.service.BaseService;
import com.vue.power.backend.sys.entity.OrganizationalStructure;
import com.vue.power.backend.sys.service.OrganizationalStructureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;

@RestController
@RequestMapping(value = "/org")
public class OrgController extends BaseController<OrganizationalStructure> {

    @Autowired
    private OrganizationalStructureService organizationalStructureService;

    @Override
    protected BaseService<OrganizationalStructure> getService() {
        return this.organizationalStructureService;
    }

    /**
     * 功能描述：获取所有的组织架构的数据
     * @return
     */
    @PostMapping("getAllOrgList")
    public Map<String,Object> getAllOrgList(){
        return organizationalStructureService.getAllOrgList();
    }

}
